The file passwdfile must be in password file format (see passwd(5)). Mkpasswd generates database files named ``passwdfile.pag'' and ``passwdfile.dir'' (see ndbm(3)). Data subsequently taken from the database files differ from passwdfile in one respect. Rather than storing the encrypted password in the database, mkpasswd stores the offset of the encrypted password in passwdfile.
Mkpasswd exits zero on success, non-zero on failure.
The -p option causes mkpasswd to create ``passwdfile.orig'', a password file in the standard Version 7 format.